<template>
	<view>
		<shop-order-one :grid_layout="true" :index="1" :current_index='index' @click="open_shop_order" @select='onSelect'></shop-order-one>
		<view>
			<shop-card v-for="shop in shop_list" :key="shop.id" :shop_info='shop'></shop-card>
		</view>
	</view>
</template>

<script>
	export default {
		name: "shop-list",
		props:{
			shop_list:{
				type:Array,
				default:()=>[]
			}
		},
		data() {
			return {
				index: -1,
			}
		},
		methods: {
			open_shop_order(index){
				console.log("点击事件",index)
				this.index = Number.parseInt(index)
			},
			onSelect(index){
				this.index = -1
				console.log("选择筛选项事件:",index)
			}
		}
	}
</script>

<style>

</style>